From: Carlos Garnacho Date: Mon, 21 Jan 2019 20:41:46 +0000 (+0100) Subject: keyboard: Fix JS warning X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=83eb75ad7a443c104352fe12c78c2f76ccef7061;p=gnome-shell.git keyboard: Fix JS warning Iterate correctly through the array, instead of stepping on the possibly non existent first element. --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index a37580b32..b1fafb953 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -860,7 +860,7 @@ var Keyboard = class Keyboard { } _setCurrentLevelLatched(layout, latched) { - for (let i = 0; layout.shiftKeys[i]; i++) { + for (let i = 0; i < layout.shiftKeys.length; i++) { let key = layout.shiftKeys[i]; key.setLatched(latched); }